package cn.zktr.Personnel.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the per_ret_wen database table.
 * 
 */
@Entity
@Table(name="per_ret_wen")
@NamedQuery(name="PerRetWen.findAll", query="SELECT p FROM PerRetWen p")
public class PerRetWen implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int wenid;

	private String wenqld;

	//bi-directional many-to-one association to PerRetRcd
	@OneToMany(mappedBy="perRetWen")
	private List<PerRetRcd> perRetRcds;

	//bi-directional many-to-one association to PerEmaTrts
	@ManyToOne
	@JoinColumn(name="TRTSID")
	private PerEmaTrts perEmaTrt;

	//bi-directional many-to-one association to PerRetDem
	@ManyToOne
	@JoinColumn(name="DEMID")
	private PerRetDem perRetDem;

	public PerRetWen() {
	}

	public int getWenid() {
		return this.wenid;
	}

	public void setWenid(int wenid) {
		this.wenid = wenid;
	}

	public String getWenqld() {
		return this.wenqld;
	}

	public void setWenqld(String wenqld) {
		this.wenqld = wenqld;
	}

	public List<PerRetRcd> getPerRetRcds() {
		return this.perRetRcds;
	}

	public void setPerRetRcds(List<PerRetRcd> perRetRcds) {
		this.perRetRcds = perRetRcds;
	}

	public PerRetRcd addPerRetRcd(PerRetRcd perRetRcd) {
		getPerRetRcds().add(perRetRcd);
		perRetRcd.setPerRetWen(this);

		return perRetRcd;
	}

	public PerRetRcd removePerRetRcd(PerRetRcd perRetRcd) {
		getPerRetRcds().remove(perRetRcd);
		perRetRcd.setPerRetWen(null);

		return perRetRcd;
	}

	public PerEmaTrts getPerEmaTrt() {
		return this.perEmaTrt;
	}

	public void setPerEmaTrt(PerEmaTrts perEmaTrt) {
		this.perEmaTrt = perEmaTrt;
	}

	public PerRetDem getPerRetDem() {
		return this.perRetDem;
	}

	public void setPerRetDem(PerRetDem perRetDem) {
		this.perRetDem = perRetDem;
	}

}